<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title><?php echo C('SITE_INFO.name');?></title>
<script type="text/javascript" src="__PUBLIC__/scripts/jquery-1.7.2.min.js"></script>
<link href="__PUBLIC__/Catalog/css/common.css" rel="stylesheet" type="text/css" />

<link href="__PUBLIC__/Catalog/css/selectOrder.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="main">
   <div class="title">
         <div class="title1">
             <a href="<?php echo U('Products/detail');?>?pid=<?php echo ($pid); ?>" id="back"> < </a>选择下单方式
         </div>
   </div>
   <form action="" id="changeMethod" method="post">
   <input type="hidden" name="products_id" value="<?php echo ($pid); ?>"/>
   <div class="cc">
        <div class="cc2">
            <table>
                 <tr>
                     <td id="imgs"><img src="__PUBLIC__/images/products/<?php echo ($productsDetail["products_image"]); ?>" /></td>
                     <td id="contents">
                         <dl>
                            <dd><?php echo ($productsDetail["products_name"]); ?></dd>
                            <!-- <dd style="margin-top:6px;"><span style="font-size:17px;">单价:</span><strong style="font-size:17px; color:red;">100元</strong></dd> -->
                            <dd>
                            <?php if($productsDetail['products_type'] == 3): ?><span style="font-size:17px;">公益商品，支付运费获取</span>
                            <?php else: ?>
                            <span style="font-size:17px;">单价:</span><strong style="font-size:17px; color:red;"><?php echo ($productsDetail["products_price"]); ?>元<?php endif; ?>
                            </strong></dd>
                         </dl>
                     </td>
                 </tr>
            </table>
        </div>
       
   </div>
   <div class="reg">
        <div class="reg2">
            <ul>
               <li style="margin-top:10px;"><span class="sp_p1">备注信息</span> </li>
               <li style="min-height:107px; margin-bottom:20px; text-align: center; "><textarea id="comment" name="comment"  rows="6" style="width:320px;  padding-left: 10px; padding-right: 10px; padding-top:5px; border: 1px solid #999; border-radius:5px;" placeholder="填写卖家恰淡的内容..."></textarea></li>
              <?php if($productsDetail['products_type'] == 3): ?><li id="sub"><input type="button" id="line" onclick="javascript:changeType('line')"  value="点击获取" /></li>
              <?php else: ?>
               <li id="sub"><input type="button" id="line" onclick="javascript:changeType('line')"  value="线下交易" /></li>
               <?php if($onlinepay == 1): ?><li id="sub"><input type="button" id="online" onclick="javascript:changeType('online')" value="在线交易" /></li><?php endif; endif; ?>
            </ul>
        </div>
   </div>
   </form>
</div>
<div class="foot"><p>注:交易前先与卖家恰淡交易细节,切勿提前向卖付款。</p></div>
<script>
$(function(){
    if('<?php echo ($msg); ?>'!='0'){
        alert('<?php echo ($msg); ?>');
    }
});
function changeType(type){
	var href="<?php echo U('Order/"+type+"');?>";
	$('#changeMethod').attr('action',href);
	$('#changeMethod').submit();
}

</script>
<div class="index-foot">
    <div class="index-foot2">
            <ul>
              <li>
                  <dl>
                      <dd class="index-dds"><a href="<?php echo U('Index/index');?>"><img src="__PUBLIC__/Catalog/images/house.png" /></a></dd>
                      <dd><a href="<?php echo U('Index/index');?>">首页</a></dd>
                  </dl>
              </li>
              <li>
                  <dl>
                      <dd class="index-dds"><a href="<?php echo U('Products/index');?>"><img src="__PUBLIC__/Catalog/images/cate1.png" /></a></dd>
                      <dd><a href="<?php echo U('Products/index');?>">商品</a></dd>
                  </dl>
              </li>
              <li>
                  <dl>
                      <dd><a href="<?php echo U('Mproducts/publish');?>"><img src="__PUBLIC__/Catalog/images/jia.png"style=" width:50px; height:50px;" /></a></dd>
                  </dl>
              </li>
              <li>
                  <dl>
                      <dd class="index-dds"><a href="<?php echo U('Membership/leaveword');?>"><img src="__PUBLIC__/Catalog/images/<?php if($count > 0): ?>message-hot.png<?php else: ?>message.png<?php endif; ?>" /></a></dd>
                      <dd><a href="<?php echo U('Membership/leaveword');?>">信息</a></dd>
                  </dl>
              </li>
              <li>
                  <dl>
                      <dd class="index-dds"><a href="<?php echo U('Membership/index');?>?uid=<?php echo ($uid); ?>"><img src="__PUBLIC__/Catalog/images/men.png" /></a></dd>
                      <dd><a href="<?php echo U('Membership/index');?>?uid=<?php echo ($uid); ?>">我的</a></dd>
                  </dl>
              </li>
            </ul>       
    </div>
</div>
</body>
</html>